﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Person
{
    class Person
    {
        private string name;
        private byte? age;
        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }

        public byte? Age
        {
            get
            {
                return this.age;
            }
            set
            {
                this.age = value;
            }
        }
        public Person(string name, byte? age = null)
        {
            this.Name = name;
            this.Age = age;
        }
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("Name of person: "+this.Name);
           
            if (age == null)
            {
                sb.Append("\nAge of " +this.Name+" is not specified.");
            }
            else
            {
                sb.Append("\nAge of " + this.Name + " is " +this.Age+".");
                           }
            return sb.ToString();
        }
    }

}

